#!/bin/bash

if [[ $(ls *.csv|wc -l) > 0 ]]; then
	rm *.csv
fi

for file in *.zip
do
	unzip $file
done

for file in API*.csv
do
	sed -i '1,4d' $file
	mongoimport --db tut --collection worldbank --type csv --headerline $file
done
